#ifndef _MOUSEEVENT_H_
#define _MOUSEEVENT_H_
#include <SECore/Event.h>

namespace SEngine
{
    enum MouseButton : uint8_t
    {
        SE_NONE     = 0,
        SE_LEFT     = 1,
        SE_MID      = 2,
        SE_RIGHT    = 3,
    };

    class MouseEvent
    {
    public:
        virtual ~MouseEvent() = default;
        void SetXPos(int x) { m_xPos = x; }
        void SetYPos(int y) { m_yPos = y; }
        void SetButton(MouseButton btn) { m_button = btn; }

        int GetXPos() { return m_xPos; }
        int GetYPos() { return m_yPos; }
        MouseButton GetButton() { return m_button; }

    private:
        int m_xPos;
        int m_yPos;
        MouseButton m_button = SE_NONE;

    };

    class MousePressEvent : public Event<MousePressEvent>, public MouseEvent
    {
    public:
        virtual ~MousePressEvent() = default;
    };

    class MouseReleaseEvent : public Event<MouseReleaseEvent>, public MouseEvent
    {
    public:
        virtual ~MouseReleaseEvent() = default;
    };
    
    class MouseMoveEvent : public Event<MouseMoveEvent>, public MouseEvent
    {
    public:
        virtual ~MouseMoveEvent() = default;
        // virtual ~MouseMoveEvent() { s_lastXPos = GetXPos(); s_lastYPos = GetYPos(); }
        // int GetLastXPos() { return s_lastXPos; }
        // int GetLastYPos() { return s_lastYPos; }

    // private:
        // static int s_lastXPos;
        // static int s_lastYPos;
    };

    class MouseWheelEvent : public Event<MouseWheelEvent>, public MouseEvent
    {
    public:
        MouseWheelEvent(int wheelX, int wheelY) : m_wheelX(wheelX), m_wheelY(wheelY) {}
        virtual ~MouseWheelEvent() = default;
        int GetWheelX() { return m_wheelX; }
        int GetWheelY() { return m_wheelY; }
    private:
        int m_wheelX;
        int m_wheelY;
    };
} // namespace SEngine


#endif